<?php

declare(strict_types=1);

use Hesb\LaravelPlus\Container;

if (!function_exists('make')) {
    function make(string $name, array $parameters = [])
    {
        if(Container::getInstance()->has($name)){
            return Container::getInstance()->get($name);
        }
        $obj = new $name(...array_values($parameters));
        Container::getInstance()->set($name,$obj);
        return $obj;
    }
}

